#pragma once

#include "GTASprite.h"
#include "TileInc.h"

class TileMgr;

class GTAMoveBoard
{
private:
	enum
	{
		MOVE_BLOCK_SIZE_X = 30,
		MOVE_BLOCK_SIZE_Y = 30,

		NEXT_BLOCK_SIZE_X = 15,
		NEXT_BLOCK_SIZE_Y = 15,

		MOVE_BOARD_WIDTH = 21,
		MOVE_BOARD_HEIGHT = 21,

		MOVE_BOARD_START_X = 69,
		MOVE_BOARD_START_Y = 69,

		NORTH_START_X = 369,
		NORTH_START_Y = 0,
		WEST_START_X = 0,
		WEST_START_Y = 369,
		SOUTH_START_X = 369,
		SOUTH_START_Y = 699,
		EAST_START_X = 699,
		EAST_START_Y = 369,

		EMPTYSPACE = 0,
		MOVE_BLOCK = 1,
		NEXT_BLOCK = 2
	};

public:
	GTAMoveBoard(void);
	~GTAMoveBoard(void);

	bool Init(void);

	void Update(float delta);
	void Render(void);

	TileMgr*	GetTileMgr(void)					{ return tileMgr; }
	int			GetPosInfo(int width, int height)	{ return mMoveBoard[height][width]; }

private:
	bool _InitMoveBlockSprite(void);
	bool _InitNextBlockSprite(void);
	bool _InitTileMgr(void);

	void _ShutDown(void);

private:
	GTASprite* mMoveBlockSprite;
	GTASprite* mNextBlockSprite;

	TileMgr* tileMgr;

	int mMoveBoard[MOVE_BOARD_HEIGHT][MOVE_BOARD_WIDTH];
	int mNextBoard[tileSetNum][tileNum][tileNum];
};
